# -*- coding: utf-8 -*-
import json
import werkzeug
from odoo import http, models, fields, api, modules
from odoo.http import request

from odoo.addons.wliot.controllers.mx_template_load import mx_web_env


class Controller(http.Controller):

    @http.route('/dashboard/')
    def graph(self):
        try:
           mydata={}
           mydata["state_list"],mydata["json_state_list"]=self.get_state_list()
           html=mx_web_env.get_template('index.html').render(mydata=mydata)
           return ""
        except Exception as ex:
            return ex.message



